﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Transactions;
using System.Data.SqlClient;
namespace DAL
{
    public  class ShiWu
    {
        DbContext db = new DBContextFactory().GetDbContext();
        #region 1.2事务专用
         ShiWu(Model.Order_Form_T model)
        { 
            using (TransactionScope scope = new TransactionScope())
            {
               
                //Do something with context1
                //Do something with context2
                //DbContext db1= new DbContext(); 
                ////Save Changes but don't discard yet
                //context1.SaveChanges(false);

                ////Save Changes but don't discard yet
                //context2.SaveChanges(false);

                ////if we get here things are looking good.
                //scope.Complete();
                //context1.AcceptAllChanges();
                //context2.AcceptAllChanges();

            }
           // return 1;
        }
        #endregion
    }
}
